<?php
    /*
     * This example demonstrates how to add any object as an mixin. 
     *
     * An extended object can add any object as an mixin by supplying the 
     * object reference and an appropriate mixin key as parameters to the
     * __addMixin() method.  Mixin keys can be overwritten, as in this
     * example, which overwrites the registered mixin key 'property' with
     * a different class type.
     *
     * @author Walter Badillo
     */
     
    require dirname(__FILE__) . DIRECTORY_SEPARATOR . '_include.php';
    
    try {
        
        echo "\n";
        
        $obj = new ClassStructure_Mixin_Delegator();
        
        echo "Test: Overwrite the property mixin key with a custom class" . "\n";
        echo '---------------------------------------------------------' . "\n\n";
        
        $obj->__addMixin(new Mixin_Property(), 'property');
        
        $obj->property__setProperty('one', 1);
        
        echo "\n\n";
        
        //----------------------------------------------------------------------
        // Expose structure
        
        echo ClassStructure_UtilityFunctions::getObjectSignature($obj);
        
    } catch (Exception $obj_exception) {
        print_r($obj_exception);
    }
    
